#ifndef CAUDIOMANAGER_H
#define CAUDIOMANAGER_H

#include "CSound.h"
#include <QString>
#include <QHash>
#include <Phonon/MediaSource>
#include "iostream"

struct TSound {
    QString fileName;
    QList<CSound*> sounds;
    Phonon::MediaSource source;
};

class CAudioManager : public QObject
{
    Q_OBJECT
public:
    CAudioManager();
    ~CAudioManager();

public slots:
    void play( QString fileName, double sound = 1.0 );
    void clear();

public:
    void switchSnd() { soundsEnabled = !soundsEnabled; }
    void switchMsc() { musicEnabled = !musicEnabled; }
    bool getSndEnabled() { return soundsEnabled; }
    bool getMscEnabled() { return musicEnabled; }

private:
    QList<TSound> files;
    bool soundsEnabled;
    bool musicEnabled;


};

#endif // CAUDIOMANAGER_H
